
function TabPage(labelName,bodyName)
{
	this.labelName=labelName;
	this.bodyName=bodyName;
	this.count=0;
	
	this.setCount=function fun(count)
	{
		this.count=count;
	}
	
	//选择一个Tab页
	this.select=function fun(num)
	{
		if(num>0 && num<=this.count)
		{
			for(var i=1;i<=this.count;i++)
			{
				document.getElementById(this.labelName+i).className="menuFreeArea";
				document.getElementById(this.bodyName+i).style.display="none";
			}
			
			document.getElementById(this.labelName+num).className="menuSelectArea";
			document.getElementById(this.bodyName+num).style.display="";
		}
	}
}
